package com.evil.application.api;

import com.evil.application.config.ApplicationFeignErrorDecoder;
import com.evil.application.pojo.dto.group.AddGroupReqDTO;
import com.evil.application.pojo.dto.group.ModifyGroupReqDTO;
import com.evil.common.family.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 应用组接口
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@FeignClient(name = ServiceNameConstant.APPLICATION_SERVICE, configuration = {ApplicationFeignErrorDecoder.class})
public interface RemoteApplicationGroupService {

    /**
     * 新增应用组
     *
     * @param addGroupReqDTO addGroupReqDTO
     */
    @PostMapping("/remote/application/group/add")
    void addGroup(@Validated @RequestBody AddGroupReqDTO addGroupReqDTO);

    /**
     * 编辑应用组
     *
     * @param modifyGroupReqDTO modifyGroupReqDTO
     */
    @PostMapping("/remote/application/group/modify")
    void modifyGroup(@Validated @RequestBody ModifyGroupReqDTO modifyGroupReqDTO);

    /**
     * 删除应用组
     *
     * @param applicationGroupId applicationGroupId
     */
    @PostMapping("/remote/application/group/delete")
    void deleteGroup(@RequestParam("applicationGroupId") Long applicationGroupId);
}
